package cn.tedu.submarine;

import javax.swing.ImageIcon;

public class BattleShip extends SeaObject{
    private int life;
    public BattleShip (){
        super(66,26,270,124,20);
        life = 5;
    }

    public ImageIcon getImage(){
        return Images.battleship; //返回战舰图片
    }
    public void move(){ }

    public Bomb shootBombs(){
        return new Bomb(x,y);
    }

    public void moveRight(){
        x+=speed;
    }

    public void moveLeft(){
        x-=speed;
    }

    public void addLife(int num){
        life +=num;
    }

    public void subtractLife(){
        life--;
    }

    public int getLife(){
        return life;
    }



}
